﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class ResponsivaFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As ResponsivaBE
        Dim tmpResponsiva As ResponsivaBE = New ResponsivaBE()
        Try
            With tmpResponsiva
                .Efectivo = convertDTFromDb.ConvertDecimal(dr.Item("Efectivo"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .GastosD = convertDTFromDb.ConvertDecimal(dr.Item("GastosD"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
                .Vendedor = convertDTFromDb.ConvertString(dr.Item("Vendedor"))
            End With
            Return tmpResponsiva
        Catch ex As Exception
            Throw
        Finally
            tmpResponsiva = Nothing
        End Try
    End Function
End Class
